package net.lzzy.lxq.dao;


import net.lzzy.lxq.entities.UserBean;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {

    @Select("select * from personnel where id=#{id} and password=#{password}")
    UserBean getUser(@Param("id") String id, @Param("password")String password);

    @Select("select * from personnel ")
    List<UserBean> getUsers();

    @Insert("insert into personnel(id,name,password,section,post) values(#{id},#{name},#{password},#{section},#{post})")
    int add(UserBean userBean);
}
